<script setup lang="ts">
import { storeToRefs } from 'pinia'
import {useStore} from '@/store/useStore'
import {ElButton} from 'element-plus'

const counter = useStore()
const { count, /* double */ } = storeToRefs(counter)

const add = () => {
  count.value++
  console.log("%c ---> count: ","color:#F00;", count.value);
}
</script>

<template>
  <h1>
    {{count}}
    <ElButton @click="add">+1</ElButton>
  </h1>
</template>

<style scoped lang="scss">

</style>
